package com.zxt.dental_sys.Config;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class ScheduledTask {

    // 每天凌晨1点执行
    @Scheduled(cron = "0 0 1 * * ?")
    public void runAt1AM() {
        System.out.println("执行每天凌晨1点的任务：" + java.time.LocalDateTime.now());
        // 你要执行的逻辑写在这里
    }
}